package top.huxy.test.model;

import lombok.Data;
import top.huxy.web.core.Verifiable;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
public class LoginForm implements Verifiable {
    private String userName;
    private String passWord;
    private String[] strArr;
    private Integer[] intArr;
    private List<String> strList;
    private List<Integer> intList;
    private List<HashMap<String, Object>> mapList;
    private Map<String, Object> map;
    private List<Item> itemList;
    private Item item;
    private int intValue;
    private Integer integerValue;
    private short shortValue;
    private Double doubleValue;
    private float floatValue;
    private Boolean booleanValue;


    @Override
    public void validate() {
        ifEmptyThrow("userName");
        ifEmptyThrow("passWord");
        ifEmptyThrow("strArr");
        ifEmptyThrow("intArr");
        ifEmptyThrow("strList");
        ifEmptyThrow("intList");
        ifEmptyThrow("mapList");
        ifEmptyThrow("map");
        ifEmptyThrow("itemList");
    }

    @Data
    public static class Item {
        private String id;
        private Integer age;
    }
}